//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "stdafx.h"
#include "FormShowInformation.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormShowInfo *FormShowInfo;
//---------------------------------------------------------------------------
__fastcall TFormShowInfo::TFormShowInfo(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormShowInfo::FormCreate(TObject *Sender)
{
	FormShowInfo->Top = FormMotionControl->Top;
	FormShowInfo->Left = FormMotionControl->Left + FormMotionControl->Width;
  FormShowInfo->Hide();
}
//---------------------------------------------------------------------------

void __fastcall TFormShowInfo::Button_ShowData(TObject *Sender)
{
	if(Sender == Button_ShowMotorSchedule)
	{
		ShowMotorSchedule(Memo_ShowInfo);
	}
	else if(Sender == Button_ShowHeadSchedule)
	{
		ShowHeadSchedule(Memo_ShowInfo);
	}
	else if(Sender == Button_ShowMotorWriteData)
	{
		ShowMotorWriteData(Memo_ShowInfo);
	}
	else if(Sender == Button_ShowMotorReadData)
	{
		ShowMotorReadData(Memo_ShowInfo);
	}
	else if(Sender == Button_ShowMotorRX)
	{
    ShowMotorRX(Memo_ShowInfo);
  }
}
//---------------------------------------------------------------------------

void __fastcall TFormShowInfo::Memo_ShowInfoDblClick(TObject *Sender)
{
	static bool extend = false;
	extend = !extend;

	if(extend)
	{
		Memo_ShowInfo->Width = 480;
	}
	else
	{
		Memo_ShowInfo->Width = 305;
  }
}
//---------------------------------------------------------------------------

void __fastcall TFormShowInfo::Memo_ShowInfoMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y)
{
	if(Button == mbMiddle)
	{
		Memo_ShowInfo->Clear();
  }
}
//---------------------------------------------------------------------------

void __fastcall TFormShowInfo::Button_MemoClearClick(TObject *Sender)
{
  Memo_ShowInfo->Clear();
}
//---------------------------------------------------------------------------

